import request from '/@/utils/request';

// 查询餐饮店的餐桌列列表
export function listTable(query?: Object) {
  return request({
    url: '/module/mer/table/list',
    method: 'get',
    params: query
  })
}

// 查询餐饮店的餐桌列详细
export function getTable(id?: number) {
  return request({
    url: '/module/mer/table/' + id,
    method: 'get'
  })
}

// 新增餐饮店的餐桌列
export function addTable(data?: Object) {
  return request({
    url: '/module/mer/table',
    method: 'post',
    data: data
  })
}

// 修改餐饮店的餐桌列
export function updateTable(data?: Object) {
  return request({
    url: '/module/mer/table',
    method: 'put',
    data: data
  })
}

// 删除餐饮店的餐桌列
export function delTable(id?: number) {
  return request({
    url: '/module/mer/table/' + id,
    method: 'delete'
  })
}

// 导出餐饮店的餐桌列
export function exportTable(query?: Object) {
  return request({
    url: '/module/mer/table/export',
    method: 'get',
    params: query
  })
}

export function resetQrCode(data?: Object) {
  return request({
    url: '/module/mer/table/resetQrCode',
    method: 'post',
    data: data
  })
}
